home *** CD-ROM | disk | FTP | other *** search
- Path: dfw.nkn.net!usenet
- From: wiersch@fastlane.net (Albert Wiersch)
- Newsgroups: comp.lang.c++
- Subject: Re: Crappy or what? Oualline's C++ book
- Date: Sat, 17 Feb 1996 01:56:19 GMT
- Organization: National Knowledge Network
- Message-ID: <4g35ei$cao@dfw.nkn.net>
- References: <KRAWCHUK.96Feb15102809@survey.ensu.ucalgary.ca>
- NNTP-Posting-Host: fw50.fastlane.net
- X-Newsreader: Forte Free Agent 1.0.82
-
- krawchuk@ensu.ucalgary.ca (Mike Krawchuk) wrote:
-
- >An instructor in our department asked me to verify some suspicions he
- >had about a book he was considering using as a text - Practical C++
- >Programming, by Steve Oualline, published by O'Reilly & Associates Inc.
-
- >After reading through it, I came to the conclusion that it is unusable.
- >It is filled with typographical errors, errors of fact, and broken code.
-
- >As one example, the section on constant pointers (p. 232) is exactly
- >wrong in its use of const to modify pointers. The code labelled
- >incorrect compiles under gcc and Borland C++; the code labelled correct
- >causes compiler errors. (as additional verification, Stroustrup's C++
- >Programming Language also verifies that Oualline is wrong, pp. 68-9)
-
- >The code provided is:
-
- > const char *answer_ptr = "Forty-Two";
-
- > answer_ptr = "Fifty-One"; // Oualline says illegal; Stroustrup, gcc says OK
- > *answer_ptr = 'X'; // Oualline says legal; Stroustrup, gcc says illegal
-
- >This is not the only glaring error in the book. Are we the only ones to
- >have noticed these errors, or is there some subtle trick we are missing?
- >The O'Reilly web site doesn't have errata for the book, but I can't
- >believe everyone else has passed over them! (we're very disappointed,
- >as we've used many O'Reilly books in classes before.)
-
- >Mike
-
- Borland C aggrees with Stroustrup... Virtually all the programming
- books have errors. I guess some just more than others though.
-
- Regards,
- Albert Wiersch
- METRO 817-589-9600
- wiersch@fastlane.net
- http://www.fastlane.net/~wiersch
-
-